package com.zjj.learn.javaplus.pkg03.demo302;

public class OutterClass2 {

    public static int age = 1;
    private double salary = 2.5;

    // 实例内部类：无static修饰，属于外部类的对象
    public class Inner2 {
        private String name;

        public static final String schoolName = "黑马";
        // 不能在实例内部类中定义静态成员！！！
//      public static String schoolName = "黑马";
//      public static void test(){
//
//      }

        // 实例方法
        public void show() {
            System.out.println(name + "名称！");
            System.out.println(age);
            System.out.println(salary);
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }
}
